set $mod Mod4

xwayland disable

input "2362:628:PIXA3854:00_093A:0274_Touchpad" {
    tap enabled
    natural_scroll enabled
    middle_emulation enabled
    dwt enabled
    drag_lock enabled
}

input "1:1:AT_Translated_Set_2_keyboard" {
    xkb_layout plde,ucteng
    xkb_options grp:shifts_toggle,compose:caps
}

output eDP-1 {
	scale 1.5
}

bar {
	position top
	modifier none
	status_command ~/.local/bin/bar_status
	height 3px
	mode overlay
	pango_markup enabled
	colors {
		focused_workspace #db9d3b #db9d3b #db9d3b
		active_workspace #db9d3b88 #db9d3b88 #db9d3b88
		inactive_workspace #ffffff00 #ffffff00 #ffffff00
		urgent_workspace #892b30 #892b30 #892b30
		background #ffffff00
	}
}

bindsym $mod+Ctrl+w resize grow height 5 px or 2 ppt
bindsym $mod+Ctrl+d resize grow width 5 px or 2 ppt

bindsym $mod+Ctrl+s resize shrink height 5 px or 2 ppt
bindsym $mod+Ctrl+a resize shrink width 5 px or 2 ppt

bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show

bindsym $mod+Ctrl+h split h
bindsym $mod+Ctrl+v split v
bindsym $mod+Ctrl+t split v, layout tabbed;

bindsym $mod+Ctrl+space floating toggle

bindsym $mod+exclam exec fun ws 1
bindsym $mod+at exec fun ws 2
bindsym $mod+numbersign exec fun ws 3
bindsym $mod+dollar exec fun ws 4
bindsym $mod+percent exec fun ws 5
bindsym $mod+asciicircum exec fun ws 6
bindsym $mod+ampersand exec fun ws 7
bindsym $mod+asterisk exec fun ws 8
bindsym $mod+parenleft exec fun ws 9
bindsym $mod+parenright exec fun ws 10

bindsym $mod+left workspace prev
bindsym $mod+right workspace next

bindsym $mod+Shift+exclam move window to workspace 1
bindsym $mod+Shift+at move window to workspace 2
bindsym $mod+Shift+numbersign move window to workspace 3
bindsym $mod+Shift+dollar move window to workspace 4
bindsym $mod+Shift+percent move window to workspace 5
bindsym $mod+Shift+asciicircum move window to workspace 6
bindsym $mod+Shift+ampersand move window to workspace 7
bindsym $mod+Shift+asterisk move window to workspace 8
bindsym $mod+Shift+parenleft move window to workspace 9
bindsym $mod+Shift+parenright move window to workspace 10

bindsym $mod+Ctrl+Return exec wezterm
bindsym $mod+f exec exec fun luakit
bindsym $mod+Shift+f exec qutebrowser
bindsym $mod+e exec wezterm start -- fun filemanager

bindsym $mod+Ctrl+r reload
bindsym $mod+Ctrl+e exit

bindsym XF86AudioRaiseVolume exec fun volume +
bindsym XF86AudioLowerVolume exec fun volume -
bindsym XF86AudioMute exec fun volume t

bindsym XF86AudioPrev exec playerctl -p $(playerctl -l | tail -n1) previous
bindsym $mod+p exec playerctl -p $(playerctl -l | tail -n1) previous
bindsym XF86AudioPlay exec playerctl -p $(playerctl -l | tail -n1) play-pause
bindsym $mod+space exec playerctl -p $(playerctl -l | tail -n1) play-pause
bindsym XF86AudioNext exec playerctl -p $(playerctl -l | tail -n1) next
bindsym $mod+n exec playerctl -p $(playerctl -l | tail -n1) next

bindsym --locked XF86MonBrightnessUp exec fun backlight +
bindsym --locked XF86MonBrightnessDown exec fun backlight -

bindsym --locked XF86KbdBrightnessUp exec fun kbdBacklight +
bindsym --locked XF86KbdBrightnessDown exec fun kbdBacklight -

bindsym XF86WLAN exec fun toggle_wifi
bindsym --locked XF86Launch3 exec fun backlight t

# todo bindsym XF86Display exec ~/Code/Scripts/changeDisplay

bindsym $mod+Ctrl+l exec swaylock
bindsym Mod4+F11 exec fun screenshot_area
bindsym Shift+F11 exec fun screenshot_this_window
bindsym Ctrl+F11 exec fun screenshot_all
bindsym Alt+F11 exec fun screenshot_window

default_border pixel 1
titlebar_border_thickness 0
default_floating_border none
hide_edge_borders both
smart_borders on
client.focused #00000000 #db9d3b #000000 #892b30 #db9d3b

bindsym $mod+Ctrl+q kill

bindsym $mod+Shift+up focus up
bindsym $mod+Shift+down focus down
bindsym $mod+Shift+left focus left
bindsym $mod+Shift+right focus right

bindsym --release Super_L exec fun guak

exec_always ~/.config/sway/sway_startup.sh
